<form class="form-horizontal" role="form" id="form_test" method="post" enctype="multipart/form-data" action="" target="ifr_result">
    <div class="form-group">
        <label class="col-xs-2 control-label">API Method</label>
        <div class="col-xs-4">
            <select id="api_method" class="form-control">
                <option value="" selected="selected">请选择...</option>
                <option value="<?= $this->url->get('appApi/token') ?>">接口授权</option>
                <option value="<?= $this->url->get('appApi/api') ?>">访问API</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">secret_token</label>
        <div class="col-xs-8">
            <input type="text" class="form-control" id="secret_token" value="test.secret" />
            <p class="help-block">如果设置自动生成签名则需要填写.</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">access_token</label>
        <div class="col-xs-8">
            <input type="text" class="form-control" id="access_token" name="access_token" value="test" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">user_token</label>
        <div class="col-xs-8">
            <input type="text" class="form-control" id="user_token" name="user_token" value="test.user" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">once</label>
        <div class="col-xs-6">
            <input type="text" class="form-control" id="once" name="once" readonly="readonly" />
        </div>
        <div class="col-xs-2">
            <label class="checkbox-inline">
                <input type="checkbox" id="once_auto" dname="ck_auto" did="#once" checked="checked" value="1"> 自动生成
            </label>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">timestamp</label>
        <div class="col-xs-6">
            <input type="text" class="form-control" id="timestamp" name="timestamp" readonly="readonly" />
        </div>
        <div class="col-xs-2">
            <label class="checkbox-inline">
                <input type="checkbox" id="timestamp_auto" dname="ck_auto" did="#timestamp" checked="checked" value="1"> 自动生成
            </label>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">attach</label>
        <div class="col-xs-8">
            <input type="text" class="form-control" id="attach" name="attach" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">version</label>
        <div class="col-xs-8"><!-- readonly="readonly" -->
            <input type="text" class="form-control" id="version" name="version" value="0.1"  />
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">format</label>
        <div class="col-xs-8">
            <input type="text" class="form-control" id="format" name="format" value="JSON" readonly="readonly" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">sign_type</label>
        <div class="col-xs-8">
            <input type="text" class="form-control" id="sign_type" name="sign_type" value="MD5" readonly="readonly" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">sign</label>
        <div class="col-xs-6">
            <input type="text" class="form-control" id="sign" name="sign" readonly="readonly" />
        </div>
        <div class="col-xs-2">
            <label class="checkbox-inline">
                <input type="checkbox" id="sign_auto" dname="ck_auto" did="#sign" checked="checked" value="1"> 自动生成
            </label>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">method</label>
        <div class="col-xs-8">
            <input type="text" class="form-control" id="method" name="method" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">post_body</label>
        <div class="col-xs-8">
            <input type="hidden" id="post_body" name="post_body" />
            <textarea class="form-control" id="box_content" rows="8" ></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">附加图片</label>
        <div class="col-xs-8">
            <input type="file" id="pics[]" name="pics[]" />
        </div>
        <div class="col-xs-8">
            <input type="file" id="pics[]" name="pics[]" />
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-12 text-center">
            <button type="submit" class="btn btn-primary">Request</button>
        </div>
    </div>
</form>

<div class="row">
    <div class="col-xs-offset-1 col-xs-10">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">处理结果</h3>
            </div>
            <div class="panel-body">
                <iframe name="ifr_result" id="ifr_result" width="100%" height="200" frameborder="no"></iframe>
                <!--textarea id="box_result" class="form-control" rows="5"></textarea -->
            </div>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-xs-offset-1 col-xs-10">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">UTF8编码转换</h3>
            </div>
            <div class="panel-body text-center">
                <div class="row">
                    <div class="col-xs-12">
                        <textarea id="utf8_value" class="form-control" rows="3"></textarea>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12" style="padding-top: 10px;">
                        <button type="button" class="btn btn-default" id="but_change_utf8">Change</button>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12" style="padding-top: 10px;">
                        <textarea id="utf8_value_result" class="form-control" rows="3"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-xs-offset-1 col-xs-10">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">BASE64编码转换</h3>
            </div>
            <div class="panel-body text-center">
                <div class="row">
                    <div class="col-xs-12">
                        <textarea id="base64_value" class="form-control" rows="3"></textarea>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12" style="padding-top: 10px;">
                        <button type="button" class="btn btn-default" id="but_change_base64">Change</button>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12" style="padding-top: 10px;">
                        <textarea id="base64_value_result" class="form-control" rows="3"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>